package com.kpf.springcloud;

import com.kpf.springcloud.pojo.JwtUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @author shiwen
 * @date 2021/2/16
 */

@SpringBootApplication
@EnableEurekaClient // 这里就相当于将服务启动后自动注册到 localhost:7001 的eureka中
@EnableDiscoveryClient  // 服务发现
@EnableAspectJAutoProxy(exposeProxy = true)
@MapperScan("com.kpf.springcloud.mapper")
@EnableScheduling   // 开启定时器
@EnableSwagger2
public class KpfProvider_8001 {

    public static void main(String[] args) {
        SpringApplication.run(KpfProvider_8001.class, args);
    }

    /**
     * 将对象扔入容器
     */
    @Bean
    public JwtUtil jwtUtil() {
        return new JwtUtil();
    }

}